Integrand size = 40, antiderivative size = 96 \[ \int \frac {(A+B \sin (e+f x)) \sqrt {c-c \sin (e+f x)}}{\sqrt {a+a \sin (e+f x)}} \, dx=\frac {(A-B) c \cos (e+f x) \log (1+\sin (e+f x))}{f \sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}}-\frac {B \cos (e+f x) \sqrt {c-c \sin (e+f x)}}{f \sqrt {a+a \sin (e+f x)}} \]
(A-B)*c*cos(f*x+e)*ln(1+sin(f*x+e))/f/(a+a*sin(f*x+e))^(1/2)/(c-c*sin(f*x+ e))^(1/2)-B*cos(f*x+e)*(c-c*sin(f*x+e))^(1/2)/f/(a+a*sin(f*x+e))^(1/2)
Result contains complex when optimal does not.
Time = 2.14 (sec) , antiderivative size = 119, normalized size of antiderivative = 1.24 \[ \int \frac {(A+B \sin (e+f x)) \sqrt {c-c \sin (e+f x)}}{\sqrt {a+a \sin (e+f x)}} \, dx=\frac {\left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) \left ((A-B) \left (-i f x+2 \log \left (i+e^{i (e+f x)}\right )\right )+B \sin (e+f x)\right ) \sqrt {c-c \sin (e+f x)}}{f \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right ) \sqrt {a (1+\sin (e+f x))}} \]
((Cos[(e + f*x)/2] + Sin[(e + f*x)/2])*((A - B)*((-I)*f*x + 2*Log[I + E^(I *(e + f*x))]) + B*Sin[e + f*x])*Sqrt[c - c*Sin[e + f*x]])/(f*(Cos[(e + f*x )/2] - Sin[(e + f*x)/2])*Sqrt[a*(1 + Sin[e + f*x])])
Time = 0.82 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.02, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3042, 3450, 3042, 3216, 3042, 3146, 16, 3217}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sqrt {c-c \sin (e+f x)} (A+B \sin (e+f x))}{\sqrt {a \sin (e+f x)+a}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sqrt {c-c \sin (e+f x)} (A+B \sin (e+f x))}{\sqrt {a \sin (e+f x)+a}}dx\) |
\(\Big \downarrow \) 3450 |
\(\displaystyle (A-B) \int \frac {\sqrt {c-c \sin (e+f x)}}{\sqrt {\sin (e+f x) a+a}}dx+\frac {B \int \sqrt {\sin (e+f x) a+a} \sqrt {c-c \sin (e+f x)}dx}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle (A-B) \int \frac {\sqrt {c-c \sin (e+f x)}}{\sqrt {\sin (e+f x) a+a}}dx+\frac {B \int \sqrt {\sin (e+f x) a+a} \sqrt {c-c \sin (e+f x)}dx}{a}\) |
\(\Big \downarrow \) 3216 |
\(\displaystyle \frac {a c (A-B) \cos (e+f x) \int \frac {\cos (e+f x)}{\sin (e+f x) a+a}dx}{\sqrt {a \sin (e+f x)+a} \sqrt {c-c \sin (e+f x)}}+\frac {B \int \sqrt {\sin (e+f x) a+a} \sqrt {c-c \sin (e+f x)}dx}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {a c (A-B) \cos (e+f x) \int \frac {\cos (e+f x)}{\sin (e+f x) a+a}dx}{\sqrt {a \sin (e+f x)+a} \sqrt {c-c \sin (e+f x)}}+\frac {B \int \sqrt {\sin (e+f x) a+a} \sqrt {c-c \sin (e+f x)}dx}{a}\) |
\(\Big \downarrow \) 3146 |
\(\displaystyle \frac {c (A-B) \cos (e+f x) \int \frac {1}{\sin (e+f x) a+a}d(a \sin (e+f x))}{f \sqrt {a \sin (e+f x)+a} \sqrt {c-c \sin (e+f x)}}+\frac {B \int \sqrt {\sin (e+f x) a+a} \sqrt {c-c \sin (e+f x)}dx}{a}\) |
\(\Big \downarrow \) 16 |
\(\displaystyle \frac {B \int \sqrt {\sin (e+f x) a+a} \sqrt {c-c \sin (e+f x)}dx}{a}+\frac {c (A-B) \cos (e+f x) \log (a \sin (e+f x)+a)}{f \sqrt {a \sin (e+f x)+a} \sqrt {c-c \sin (e+f x)}}\) |
\(\Big \downarrow \) 3217 |
\(\displaystyle \frac {c (A-B) \cos (e+f x) \log (a \sin (e+f x)+a)}{f \sqrt {a \sin (e+f x)+a} \sqrt {c-c \sin (e+f x)}}-\frac {B \cos (e+f x) \sqrt {c-c \sin (e+f x)}}{f \sqrt {a \sin (e+f x)+a}}\) |
((A - B)*c*Cos[e + f*x]*Log[a + a*Sin[e + f*x]])/(f*Sqrt[a + a*Sin[e + f*x ]]*Sqrt[c - c*Sin[e + f*x]]) - (B*Cos[e + f*x]*Sqrt[c - c*Sin[e + f*x]])/( f*Sqrt[a + a*Sin[e + f*x]])
3.2.76.3.1 Defintions of rubi rules used
Int[(c_.)/((a_.) + (b_.)*(x_)), x_Symbol] :> Simp[c*(Log[RemoveContent[a + b*x, x]]/b), x] /; FreeQ[{a, b, c}, x]
Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m _.), x_Symbol] :> Simp[1/(b^p*f) Subst[Int[(a + x)^(m + (p - 1)/2)*(a - x )^((p - 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && I ntegerQ[(p - 1)/2] && EqQ[a^2 - b^2, 0] && (GeQ[p, -1] || !IntegerQ[m + 1/ 2])
Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]/Sqrt[(c_) + (d_.)*sin[(e_.) + (f_.)*(x_)]], x_Symbol] :> Simp[a*c*(Cos[e + f*x]/(Sqrt[a + b*Sin[e + f*x ]]*Sqrt[c + d*Sin[e + f*x]])) Int[Cos[e + f*x]/(c + d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0 ]
Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]*((c_) + (d_.)*sin[(e_.) + (f _.)*(x_)])^(n_), x_Symbol] :> Simp[-2*b*Cos[e + f*x]*((c + d*Sin[e + f*x])^ n/(f*(2*n + 1)*Sqrt[a + b*Sin[e + f*x]])), x] /; FreeQ[{a, b, c, d, e, f, n }, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[n, -2^(-1)]
Int[Sqrt[(a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)]]*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp [B/d Int[Sqrt[a + b*Sin[e + f*x]]*(c + d*Sin[e + f*x])^(n + 1), x], x] - Simp[(B*c - A*d)/d Int[Sqrt[a + b*Sin[e + f*x]]*(c + d*Sin[e + f*x])^n, x ], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && EqQ[b*c + a*d, 0] && EqQ[ a^2 - b^2, 0]
Leaf count of result is larger than twice the leaf count of optimal. \(305\) vs. \(2(88)=176\).
Time = 3.39 (sec) , antiderivative size = 306, normalized size of antiderivative = 3.19
method | result | size |
parts | \(-\frac {A \left (2 \ln \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1\right )-\ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right )\right ) \sqrt {-c \left (\sin \left (f x +e \right )-1\right )}\, \left (\cos \left (f x +e \right )+\sin \left (f x +e \right )+1\right )}{f \left (-\cos \left (f x +e \right )+\sin \left (f x +e \right )-1\right ) \sqrt {a \left (1+\sin \left (f x +e \right )\right )}}+\frac {B \left (2 \cos \left (f x +e \right ) \ln \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1\right )+2 \ln \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1\right ) \sin \left (f x +e \right )-\ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right ) \cos \left (f x +e \right )-\ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right ) \sin \left (f x +e \right )+\cos ^{2}\left (f x +e \right )-\cos \left (f x +e \right ) \sin \left (f x +e \right )+2 \ln \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1\right )-\ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right )-\sin \left (f x +e \right )-1\right ) \sqrt {-c \left (\sin \left (f x +e \right )-1\right )}}{f \left (-\cos \left (f x +e \right )+\sin \left (f x +e \right )-1\right ) \sqrt {a \left (1+\sin \left (f x +e \right )\right )}}\) | \(306\) |
default | \(\frac {\left (A \sin \left (f x +e \right ) \ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right )-2 A \sin \left (f x +e \right ) \ln \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1\right )+A \cos \left (f x +e \right ) \ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right )-2 A \cos \left (f x +e \right ) \ln \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1\right )-B \cos \left (f x +e \right ) \sin \left (f x +e \right )-B \sin \left (f x +e \right ) \ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right )+2 B \sin \left (f x +e \right ) \ln \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1\right )+B \left (\cos ^{2}\left (f x +e \right )\right )-B \cos \left (f x +e \right ) \ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right )+2 B \cos \left (f x +e \right ) \ln \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1\right )+A \ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right )-2 A \ln \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1\right )-B \sin \left (f x +e \right )-B \ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right )+2 B \ln \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1\right )-B \right ) \sqrt {-c \left (\sin \left (f x +e \right )-1\right )}}{f \left (-\cos \left (f x +e \right )+\sin \left (f x +e \right )-1\right ) \sqrt {a \left (1+\sin \left (f x +e \right )\right )}}\) | \(347\) |
-A/f*(2*ln(-cot(f*x+e)+csc(f*x+e)+1)-ln(2/(1+cos(f*x+e))))*(-c*(sin(f*x+e) -1))^(1/2)*(cos(f*x+e)+sin(f*x+e)+1)/(-cos(f*x+e)+sin(f*x+e)-1)/(a*(1+sin( f*x+e)))^(1/2)+B/f*(2*cos(f*x+e)*ln(-cot(f*x+e)+csc(f*x+e)+1)+2*ln(-cot(f* x+e)+csc(f*x+e)+1)*sin(f*x+e)-ln(2/(1+cos(f*x+e)))*cos(f*x+e)-ln(2/(1+cos( f*x+e)))*sin(f*x+e)+cos(f*x+e)^2-cos(f*x+e)*sin(f*x+e)+2*ln(-cot(f*x+e)+cs c(f*x+e)+1)-ln(2/(1+cos(f*x+e)))-sin(f*x+e)-1)*(-c*(sin(f*x+e)-1))^(1/2)/( -cos(f*x+e)+sin(f*x+e)-1)/(a*(1+sin(f*x+e)))^(1/2)
\[ \int \frac {(A+B \sin (e+f x)) \sqrt {c-c \sin (e+f x)}}{\sqrt {a+a \sin (e+f x)}} \, dx=\int { \frac {{\left (B \sin \left (f x + e\right ) + A\right )} \sqrt {-c \sin \left (f x + e\right ) + c}}{\sqrt {a \sin \left (f x + e\right ) + a}} \,d x } \]
integrate((A+B*sin(f*x+e))*(c-c*sin(f*x+e))^(1/2)/(a+a*sin(f*x+e))^(1/2),x , algorithm="fricas")
\[ \int \frac {(A+B \sin (e+f x)) \sqrt {c-c \sin (e+f x)}}{\sqrt {a+a \sin (e+f x)}} \, dx=\int \frac {\sqrt {- c \left (\sin {\left (e + f x \right )} - 1\right )} \left (A + B \sin {\left (e + f x \right )}\right )}{\sqrt {a \left (\sin {\left (e + f x \right )} + 1\right )}}\, dx \]
Time = 0.36 (sec) , antiderivative size = 176, normalized size of antiderivative = 1.83 \[ \int \frac {(A+B \sin (e+f x)) \sqrt {c-c \sin (e+f x)}}{\sqrt {a+a \sin (e+f x)}} \, dx=\frac {B {\left (\frac {2 \, \sqrt {c} \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{\sqrt {a}} - \frac {\sqrt {c} \log \left (\frac {\sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + 1\right )}{\sqrt {a}} - \frac {2 \, \sqrt {a} \sqrt {c} \sin \left (f x + e\right )}{{\left (a + \frac {a \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (f x + e\right ) + 1\right )}}\right )} - A {\left (\frac {2 \, \sqrt {c} \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{\sqrt {a}} - \frac {\sqrt {c} \log \left (\frac {\sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + 1\right )}{\sqrt {a}}\right )}}{f} \]
integrate((A+B*sin(f*x+e))*(c-c*sin(f*x+e))^(1/2)/(a+a*sin(f*x+e))^(1/2),x , algorithm="maxima")
(B*(2*sqrt(c)*log(sin(f*x + e)/(cos(f*x + e) + 1) + 1)/sqrt(a) - sqrt(c)*l og(sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 1)/sqrt(a) - 2*sqrt(a)*sqrt(c)*si n(f*x + e)/((a + a*sin(f*x + e)^2/(cos(f*x + e) + 1)^2)*(cos(f*x + e) + 1) )) - A*(2*sqrt(c)*log(sin(f*x + e)/(cos(f*x + e) + 1) + 1)/sqrt(a) - sqrt( c)*log(sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 1)/sqrt(a)))/f
Time = 0.38 (sec) , antiderivative size = 143, normalized size of antiderivative = 1.49 \[ \int \frac {(A+B \sin (e+f x)) \sqrt {c-c \sin (e+f x)}}{\sqrt {a+a \sin (e+f x)}} \, dx=\frac {\sqrt {2} {\left (\frac {2 \, \sqrt {2} B \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2}}{\sqrt {a} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )} - \frac {\sqrt {2} {\left (A \sqrt {a} \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) - B \sqrt {a} \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )\right )} \log \left (-4 \, \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 4\right )}{a \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}\right )} \sqrt {c}}{2 \, f} \]
integrate((A+B*sin(f*x+e))*(c-c*sin(f*x+e))^(1/2)/(a+a*sin(f*x+e))^(1/2),x , algorithm="giac")
1/2*sqrt(2)*(2*sqrt(2)*B*sgn(sin(-1/4*pi + 1/2*f*x + 1/2*e))*sin(-1/4*pi + 1/2*f*x + 1/2*e)^2/(sqrt(a)*sgn(cos(-1/4*pi + 1/2*f*x + 1/2*e))) - sqrt(2 )*(A*sqrt(a)*sgn(sin(-1/4*pi + 1/2*f*x + 1/2*e)) - B*sqrt(a)*sgn(sin(-1/4* pi + 1/2*f*x + 1/2*e)))*log(-4*sin(-1/4*pi + 1/2*f*x + 1/2*e)^2 + 4)/(a*sg n(cos(-1/4*pi + 1/2*f*x + 1/2*e))))*sqrt(c)/f
Timed out. \[ \int \frac {(A+B \sin (e+f x)) \sqrt {c-c \sin (e+f x)}}{\sqrt {a+a \sin (e+f x)}} \, dx=\int \frac {\left (A+B\,\sin \left (e+f\,x\right )\right )\,\sqrt {c-c\,\sin \left (e+f\,x\right )}}{\sqrt {a+a\,\sin \left (e+f\,x\right )}} \,d x \]